from random import random
from time import sleep
from tqdm import tqdm
with tqdm(range(10)) as loop1:
    for i in loop1:
        sleep(0.1)
tqdm.write("123")
with tqdm(range(10)) as loop2:
    for i in loop2:
        sleep(0.1)
# epochs = 2
# train_data_num = 10
# for i in range(epochs):
#     tqdm.write("{}".format(i))
#     with tqdm(total=train_data_num) as t:
#         for j in range(10):
#             # Description will be displayed on the left
#             t.set_description('Epoch %i' % i)
#             # Postfix will be displayed on the right,
#             # formatted automatically based on argument's datatype
#             t.set_postfix(loss=random(),acc=random())
#             sleep(0.1)
#             t.update(1)